﻿using MHI.Generic;
using WebFoundation;
using WebFoundation.GenericModules.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MHI.ScenarioManager.Interfaces
{
    /// <summary>
    /// The type of scenario
    /// </summary>
    public enum enumScenarioType
    {
        MIKE11Model,
        MIKEBASINModel,
        MIKE21Model,
        MIKE21FMModel,
        MIKE3FMModel,
        MIKEFloodModel,
        MIKESHEModel,
        MIKEUrbanCSModel,
        MIKEUrbanWDModel,
        HydroBasinModel,
        InpWDModel,
        XAJ11Model,
        FeflowModel,
        WestModel,
        SWMMModel,
        EFDCModel,
        /// <summary>
        /// 水量预测模型-包括传统预测方法和灰度预测方法
        /// </summary>
        WaterForecastModel,
        /// <summary>
        /// 水资源优化调度计算
        /// </summary>
        HydroBasinOptimModel,
        MIKEUrbanCSPlusModel,
        MIKEUrbanWDPlusModel,
        Unknown
    }

    public enum enumSubType
    {
        ManualSchedule,
        EconomicSchedule,
        OptimizeSchedule,
        UnprocessedWater,
        DataAssimilation,//DA
        EmerResponse,// 应对预案
        Forcast,//预报预警
        EmerMnt,//应急监测计划
        Scenario,  //预案
        Incident,  //事故
        ParaOptimi, //参数优化
        SourceAnalysis, //参数优化
        WQEvaluation, //生态优化
        SpatialTime, //时空模拟
        Planning, //辅助规划
        OilSpill,
        Year, //调水方案时间类型
        Month,
        TenDays,
        /// <summary>
        /// 水泵关停
        /// </summary>
        PumpShutdown,
        /// <summary>
        /// 突发爆管
        /// </summary>
        PipeBurst,
        Unknown //
    }

    public enum enumMUScenarioType
    {
        /// <summary>
        /// 供水
        /// </summary>
        WaterSuply,

        /// <summary>
        /// 排水
        /// </summary>
        Sewer
    }

    /// <summary>
    /// MIKE Urban Plus 模型类型
    /// </summary>
    public enum enumMUPlusScenarioType
    {
        /// <summary>
        /// 供水
        /// </summary>
        WaterDistribution = 3,

        /// <summary>
        /// 排水
        /// </summary>
        CollectionSystem = 1
    }

    public interface IScenarioModule : IWFModule
    {
        IScenarioGroupList ScenarioGroups { get; }

        IScenarioList Scenarios { get; }

        Scenario CreateTemplateScenario(string modelFile, Guid groupId, string sAddScenarioName, string subType, string sRemark);

        Scenario CreateScenario(Guid templateScenarioId, Guid groupId, string sAddScenarioName, string sStartTime, string sEndTime, string subType, string sRemark);

        Scenario CreateScenarioFromFile(string modelFile, Guid groupId, string sAddScenarioName, string subType, string sRemark);

        //IModel GetModel(Scenario scenario);

        string ModelDir(Scenario scenario);

        string ScenarioDir(Scenario scenario);

        string ModelFileName(Scenario scenario);

        //bool UpdateScenarioAndModel(Scenario scenario);

        bool DeleteScenarioAndModel(Scenario scenario);

        bool DeleteScenarioGroupAndScenario(Group group);
    }
}
